package com.lishe.lishe.lishe.bean;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by law on 2017/8/16.
 */

public class UserAddressObject implements Serializable {
    private String receiverAddress;
    private String receiverCity;
    private String receiverDistrict;
    private String receiverMobile;
    private String receiverName;
    private String receiversState;
    private String tid;
    private String userId;

    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }


    public String getReceiverCity() {
        return receiverCity;
    }

    public void setReceiverCity(String receiverCity) {
        this.receiverCity = receiverCity;
    }

    public String getReceiverDistrict() {
        return receiverDistrict;
    }

    public void setReceiverDistrict(String receiverDistrict) {
        this.receiverDistrict = receiverDistrict;
    }

    public String getReceiverMobile() {
        return receiverMobile;
    }

    public void setReceiverMobile(String receiverMobile) {
        this.receiverMobile = receiverMobile;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiversState() {
        return receiversState;
    }

    public void setReceiversState(String receiversState) {
        this.receiversState = receiversState;
    }

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * json解析
     */
    public void optJson(UserAddressObject userAddressObject, JSONObject jsonObject) {
        userAddressObject.setReceiverAddress(jsonObject.optString("receiver_address"));
        userAddressObject.setReceiverCity(jsonObject.optString("receiver_city"));
        userAddressObject.setReceiverDistrict(jsonObject.optString("receiver_district"));
        userAddressObject.setReceiverMobile(jsonObject.optString("receiver_mobile"));
        userAddressObject.setReceiverName(jsonObject.optString("receiver_name"));
        userAddressObject.setReceiversState(jsonObject.optString("receiver_state"));
        userAddressObject.setTid(jsonObject.optString("tid"));
        userAddressObject.setUserId(jsonObject.optString("user_id"));
    }
}
